<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page import="entity.tDevice"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>设备-水处理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="css/style.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
		<div class="main">
			<jsp:include page="conter/header.jsp"></jsp:include>
			<div class="certen">
				<jsp:include page="conter/deviceLeft.jsp"></jsp:include>

				<div class="content">
					<div class="mainbar">
						<div class="runbutton">
							<h2>
								<span style="margin-left: 25px; letter-spacing: 8px;">查找设备显示</span>
							</h2>
							<div class="clr"></div>
						</div>
						<div style="height: auto;">
							<table width="100%" height="100%" border="0" cellspacing="0"
								cellpadding="0"
								style="margin-bottom: 10px; margin-top: 10px; text-algin: center;; word-break: break-all; word-wrap: break-all;">
								<tr>
									<td>
										<img src="images/tb.gif" />
										<span
											style="margin-left: 10px; font-weight: bold; font-size: 18px; color: #595959;">为您查找到的设备</span>
									</td>
								</tr>
								<tr>
										<table border="0" cellpadding="0" cellspacing="1"
											bgcolor="b5d6e6">
											<tr class="sb_list_top">
												<td width="10%">
													序列号
												</td>
												<td width="10%">
													设备名称
												</td>
												<td width="12%">
													新建时间
												</td>
												<td width="10%">
													区域
												</td>
												<td width="18%">
													详细地址
												</td>
												<td width="20%">
													描述
												</td>
												<td width="10%">
													基本操作
												</td>
											</tr>

											<s:iterator id="lists" value="#request.lists">
												<tr class="sb_list">
													<td>
														<a href="runDeviceAction?deviceId=${deviceId}">${deviceNo
															}</a>
													</td>
													<td>
														<a href="runDeviceAction?deviceId=${deviceId}">${deviceName
															}</a>
													</td>
													<td>
														${addTime }
													</td>
													<td>
														${deviceArea }
													</td>
													<td>
														${place }
													</td>
													<td>
														${deviceDescribe }
													</td>
													<td>
														<img src="images/sxt.gif" height="16" width="16" />
														视频
														<br />
														<img src="images/edt.gif" height="16" width="16" />
														<s:if test="#session.user.grade == 2 || #session.user.grade == 1">
														<s:a
															href="gettDeviceDateToAlter?deviceId=%{#lists.deviceId}&mac=%{#lists.mac}">修改</s:a>
														<br />
														<img src="images/Report.jpg" height="16" width="16" />
														<a
															href="gettDeviceDateToAllot?deviceId=${deviceId}&userId=${userId}">分配</a>
														</s:if>
													</td>
												</tr>
											</s:iterator>
										</table>
								</tr>
							</table>

							<div class="clr"></div>
						</div>
						<div class="pagenavi">
							<span class="pages">Page &nbsp;&nbsp;<s:property
									value="pageBean.currentPage" /> &nbsp;&nbsp;of &nbsp;&nbsp; <s:property
									value="pageBean.totalPage" /> </span>

							<s:if test="%{pageBean.currentPage == 1}">
								<span class="current"> 首页 </span> 上一页
        </s:if>
							<s:else>
								<span class="current"> <a
									href="searchtDeviceAction?page=1">首页</a>
								</span>
								<a
									href="searchtDeviceAction?page=<s:property value="%{pageBean.currentPage-1}"/>">上一页</a>
							</s:else>
							<s:if test="%{pageBean.currentPage != pageBean.totalPage}">
								<a
									href="searchtDeviceAction?page=<s:property value="%{pageBean.currentPage+1}"/>">下一页</a>
								<a
									href="searchtDeviceAction?page=<s:property value="pageBean.totalPage"/>">尾页</a>
							</s:if>
							<s:else>
            下一页 尾页
        </s:else>
						</div>
					</div>

					<div class="clr"></div>
				</div>
			</div>

			<script src="js/jquery-1.8.2.min.js" type="text/javascript">
</script>
			<script src="js/jquery.carouFredSel-6.0.4-packed.js"
				type="text/javascript">
</script>
			<div class="fbg">
				<div class="fbg_resize">
					<jsp:include page="conter/slide.jsp"></jsp:include>
				</div>
			</div>
			<jsp:include page="conter/footer.jsp"></jsp:include>
		</div>
	</body>
</html>